package com.design.factory.SimpleFactory;

/*
* 来源： https://www.jianshu.com/p/78c4d93fab87   https://github.com/nezha/DesignPatterns
* 重点祥述： https://www.imooc.com/article/11675#comment
*
*
*
*/
public class MainTestSimple {
 
	public static void main(String[] args) {
		SimplePizzaFactory factory = new SimplePizzaFactory();
		PizzaStore store = new PizzaStore(factory); // PizzaStore <--- SimplePizzaFactory

		Pizza pizza = store.orderPizza("cheese");
		System.out.println("We ordered a " + pizza.getName() + "\n");
 
		pizza = store.orderPizza("veggie");
		System.out.println("We ordered a " + pizza.getName() + "\n");
	}
}
